package com.wenshi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class SysDevice {

    @NotBlank(message = "设备Id不能为空")
    @TableId(value = "device_id", type = IdType.AUTO)
    private Long deviceId;

    private String deviceName;

    private String deviceType;
    @NotBlank(message = "设备Ip不能为空")
    private String deviceIp;

    private Long devicePort;

    private boolean deviceStatus;

    private String deviceArea;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    public SysDevice() {
    }

    public SysDevice(Long deviceId, String deviceName, String deviceType, String deviceIp, Long devicePort, String deviceArea, String createTime) {
        this.deviceId = deviceId;
        this.deviceName = deviceName;
        this.deviceType = deviceType;
        this.deviceIp = deviceIp;
        this.devicePort = devicePort;
        this.deviceArea = deviceArea;
        this.createTime = createTime;
    }
}
